#ifndef ABSSERVER_H
#define ABSSERVER_H

#include <QObject>
#include <QTcpServer>
#include <QTcpSocket>
#include <QList>
#include <QVector>

#include "msgsocket.h"

//////////////////////////////////////////////////////////////////////
/// \brief The TcpServer class
/// 服务器管理类
class AbsServer : public QObject {
    Q_OBJECT
public:
    explicit AbsServer(QObject *parent = 0);
    ~AbsServer();

    bool StartListen(int port = 6666);
    void CloseListen();
signals:
    void signalUserStatus(const QString &text);
protected:
    QTcpServer *m_tcpServer;

public slots:

protected slots:
    // 纯虚函数
    virtual void SltNewConnection() = 0;
    virtual void SltConnected() = 0;
    virtual void SltDisConnected() = 0;
};

#endif // ABSSERVER_H
